home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / iohog.1 < prev    next >
Text File  |  1995-07-25  |  11KB  |  265 lines

  1.  
  2.  
  3.  
  4.      hhhhoooogggg((((1111CCCC))))                UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD))))                hhhhoooogggg((((1111CCCC))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           memhog - memory hog analyser
  10.           cpuhog - cpu hog analyser
  11.           iohog - I/O hog analyser
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           mmmmeeeemmmmhhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [
  15.           ----iiii _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----DDDD ] [ ----TTTT ] [ ----VVVV ]
  16.           iiiioooohhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [ ----iiii
  17.           _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----dddd char | swap ] [ ----DDDD ] [ ----TTTT ] [
  18.           ----VVVV ]
  19.           ccccppppuuuuhhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [
  20.           ----iiii _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----dddd system | user | load ] [ ----VVVV
  21.           ] [ ----%%%% ] [ ----DDDD ] [ ----TTTT ]
  22.  
  23.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.           The _h_o_g commands analyse resource use by processes.  The _h_o_g
  25.           commands all work in the same basic way, but observe the
  26.           consumption of different resources.  _m_e_m_h_o_g examines memory
  27.           use, _c_p_u_h_o_g examines processor use, and _i_o_h_o_g examines I/O
  28.           use.  In the following discussion, _h_o_g means one of the
  29.           possible invocations (e.g., memhog), and _r_e_s_o_u_r_c_e refers to
  30.           the resource in which that _h_o_g is interested.
  31.  
  32.           _h_o_g runs in a loop.  Each time it loops, the _r_e_s_o_u_r_c_e
  33.           consumption for each process is obtained from the kernel,
  34.           and a ``hog'' value computed, based on a _r_e_s_o_u_r_c_e-_s_p_e_c_i_f_i_c
  35.           algorithm.  The algorithm is intended to measure the overall
  36.           impact of a process on the _r_e_s_o_u_r_c_e.  After the ``hog''
  37.           values are computed, the processes are displayed in
  38.           descending ``hog'' order.  Thus, the process at the top if
  39.           of the display is using the most _r_e_s_o_u_r_c_e.  Note that a
  40.           process with a ``hog'' value of zero will not be displayed.
  41.           _h_o_g is terminated by sending it SIGINT.
  42.  
  43.           Each process is represented in the display by a single line,
  44.           with the pid and uid associated with the process on the
  45.           left, and the command being executed on the right.  In the
  46.           middle are _r_e_s_o_u_r_c_e-specific numbers.  The top line of the
  47.           display contains a legend, and possibly some overall system
  48.           statistics relating to _r_e_s_o_u_r_c_e.
  49.  
  50.         GGGGeeeennnneeeerrrraaaallll FFFFllllaaaaggggssss
  51.           ----pppp   _n_u_m specifies the number of processes to consider for
  52.                display [default 20].
  53.  
  54.           ----cccc   _c_o_l_s specifies the number of columns to use for the
  55.                display window [default 80].
  56.  
  57.           ----llll   _l_i_n_e_s specifies the number of lines to use for the
  58.                display window [default 24].
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 2/20/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      hhhhoooogggg((((1111CCCC))))                UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD))))                hhhhoooogggg((((1111CCCC))))
  71.  
  72.  
  73.  
  74.           ----wwww   specifies that a curses window should not be used, the
  75.                lines are simply written to standard output.
  76.  
  77.           ----tttt   specifies that a timestamp should be displayed.
  78.  
  79.           ----iiii   _i_n_t_e_r_v_a_l specifies the sampling interval, in seconds
  80.                [default 5].  (Actually, _h_o_g sleeps for this long
  81.                between scans).
  82.  
  83.           ----ssss   _s_m_o_o_t_h specifies the number of observations to use in
  84.                the smoothing algorithm [default 1 (no smoothing)].
  85.  
  86.           ----dddd   Specifies a _r_e_s_o_u_r_c_e-specific _d_e_t_a_i_l string that is
  87.                used to specify that output should be sorted on a
  88.                different ``hog'' value.  The available options are
  89.                discussed in the individual _h_o_g command sections below.
  90.  
  91.           ----VVVV   Specifies that actual resource use should be shown, not
  92.                percentages.  This is the default.
  93.  
  94.           ----%%%%   Specifies that percentage resource use should be shown,
  95.                not actual values.  This is only available for certain
  96.                resources, see above.
  97.  
  98.           ----DDDD   Specifies that ``delta'' resource consumption should be
  99.                shown, not totals.  The ``delta'' is the (possibly
  100.                smoothed) consumption since the the last sample.  It
  101.                shows recent resource consumption.
  102.  
  103.           ----TTTT   Specifies that total resource consumption should be
  104.                shown, not delta.  This shows the total resource
  105.                consumed since the process started.  This is the
  106.                default for _m_e_m_h_o_g.
  107.  
  108.         mmmmeeeemmmmhhhhoooogggg
  109.           _m_e_m_h_o_g examines memory use.  It examines the regions
  110.           attached to a process, and examines the memory usage of each
  111.           region.  It sums the statistics for each region to produce
  112.           totals for the process:
  113.  
  114.           _v_s_i_z_e
  115.                The sum of the virtual sizes of the regions: the
  116.                virtual size of the process.
  117.  
  118.           _s_h_r_d The sum of the number of valid (i.e., resident) real
  119.                pages for regions that are shareable.
  120.  
  121.           _p_r_i_v The sum of number of valid real pages for regions that
  122.                are private.
  123.  
  124.           _w_t_d  For each sharable region, compute the valid real pages
  125.                divided by the reference count.  Each process is deemed
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 2/20/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      hhhhoooogggg((((1111CCCC))))                UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD))))                hhhhoooogggg((((1111CCCC))))
  137.  
  138.  
  139.  
  140.                to be ``responsible'' for this much of the region's
  141.                real memory use.  _w_t_d is the sum over all shareable
  142.                regions attached to the process.
  143.  
  144.           _t_o_t_a_l
  145.                is the sum of priv and wtd, and is intended to
  146.                represent the real memory impact of this process.
  147.  
  148.           _m_e_m_h_o_g also shows the current values for: _f_r_e_e_m_e_m,
  149.           _a_v_a_i_l_r_m_e_m, and _a_v_a_i_l_s_m_e_m.
  150.  
  151.         iiiioooohhhhoooogggg
  152.           _i_o_h_o_g examines I/O use by processes.  It examines the u-area
  153.           of the process and computes:
  154.  
  155.           _s_w_a_p is based on u_iosw and is the number of blocks
  156.                transferred to or from a swap device on behalf of this
  157.                process.
  158.  
  159.           _c_h_a_r is based on u_ioch, and is the number of bytes read or
  160.                written by this process.
  161.  
  162.           _r_e_a_d is based on u_ior and is the number of blocks read by
  163.                this process.
  164.  
  165.           _w_r_i_t_e
  166.                is based on u_iow and is the number of blocks written
  167.                on behalf of this process.  Note that a process is
  168.                charged when a block is written to the disk, not to the
  169.                buffer cache.  Therefore, a process that writes a block
  170.                and gets a cache hit is not charged for a write.  A
  171.                process that issues a read that causes a dirty cache
  172.                block to be written is charged for the write, even if
  173.                it did not write the block into the cache originally.
  174.  
  175.           _t_o_t_a_l
  176.                is the sum of the read and write values.
  177.  
  178.           The -_d option can specify that the _s_w_a_p or _c_h_a_r_a_c_t_e_r value
  179.           should be considered the ``hog'' value (and thus be used for
  180.           sorting).  The default is to use ``total''.
  181.  
  182.         ccccppppuuuuhhhhoooogggg
  183.           _c_p_u_h_o_g examines CPU use.
  184.  
  185.           _u_s_e_r is the user cpu time.
  186.  
  187.           _s_y_s_t_e_m
  188.                is the system cpu time.
  189.  
  190.           _t_o_t_a_l
  191.                is the total user + system time.
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 2/20/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      hhhhoooogggg((((1111CCCC))))                UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD))))                hhhhoooogggg((((1111CCCC))))
  203.  
  204.  
  205.  
  206.           _s_m_p_l (on the top line) shows the number of clock ticks
  207.                between successive samples.
  208.  
  209.           _i_d_l_e (on the top line) shows the CPU idle time, as recorded
  210.                in sysinfo.
  211.  
  212.           _w_a_i_t (on the top line) shows the CPU wait-idle (i.e., idle
  213.                waiting for I/O completions), as recorded in sysinfo.
  214.  
  215.           The -% option can be used to display percentages instead of
  216.           actual clock ticks.  The percentages are percentages of
  217.           elapsed time.  The -_d option can be used to specify that
  218.           sorting should be done on _s_y_s_t_e_m or _u_s_e_r time.  It cannot be
  219.           used in conjunction with -%.  The -_d option _l_o_a_d is
  220.           experimental and should not be used.
  221.  
  222.      BBBBUUUUGGGGSSSS
  223.           The program takes a snapshot of several dynamic kernel data
  224.           structures from user mode.  As such, the information is
  225.           sometimes inconsistent.  It does the best it can under such
  226.           circumstances.
  227.  
  228.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  229.           sar, showreg
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 2/20/95)
  262.  
  263.  
  264.  
  265.